package com.atguigu.proxy.staticProxy;

/**
 * @program: design-patterns
 * @author: yangshen
 * @description:
 * @create: 2022-02-24 22:17
 **/
public class Client {
    public static void main(String[] args) {
        //1.创建目标对象
        TeacherDao target = new TeacherDao();
        //2.创建代理对象,同时将被代理对象传递给代理对象
        TeacherDaoProxy teacherDaoProxy = new TeacherDaoProxy(target);
        //3.通过代理对象，调用被代理对象的方法
        teacherDaoProxy.teach();
    }
}
